
include (../../core/build/api-impl/posix/cubefs-core-api.cmake)
include (../../core/build/containers/stream/posix/cubefs-stream-posix.cmake)

include_directories(../../core/include . )
include_directories(../../core/api)

try_run(ARCH64 CVAR  ${CMAKE_BINARY_DIR}  ${CMAKE_SOURCE_DIR}/native/checks/arch.c)

file(GLOB SRC_LIST *.cpp)

if (ARCH64)
    add_library(cubefs-core-java.x86_64 SHARED ${SRC_LIST})
    target_link_libraries(cubefs-core-java.x86_64 cubefs-core-api)
else (ARCH64)
    add_library(cubefs-core-java.x86_32 SHARED ${SRC_LIST})
#    target_link_libraries(cubefs-core-java.x86_32 cubefs)
endif (ARCH64)
